package com.yanqu.road.entity.giftKey;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author wpj
 * @Date 2021/12/31
 */
@FieldTypeAnnotation(tableName = "t_u_gift_key_red_packet")
public class UserGiftKeyRedPacket extends DataObject {
    @FieldTypeAnnotation(select = true, update = true)
    long userId;

    @FieldTypeAnnotation(update = true, desc = "兑换码")
    String key = "";

    @FieldTypeAnnotation(desc = "开始时间(毫秒)")
    long startTime;

    @FieldTypeAnnotation(desc = "兑换码红包配置")
    String settings = "";

    @FieldTypeAnnotation(desc = "上一次请求时间(毫秒)")
    long lastReqTime;

    @FieldTypeAnnotation(desc = "滑红包元宝数量列表")
    List<Integer> ingotsList = new ArrayList<>();

    @FieldTypeAnnotation(desc = "最终获得的元宝数量")
    int realGetIngots;

    @FieldTypeAnnotation(desc = "是否结算元宝")
    boolean getIngots;

    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public String getKey() {
        return key;
    }
    public void setKey(String key) {
        if (key == null){
            return;
        }
        if (this.key == null || !this.key.equals(key)) {
            this.key = key;
            setOp(DataStatus.Update);
        }
    }

    public long getStartTime() {
        return startTime;
    }
    public void setStartTime(long startTime) {
        if (this.startTime != startTime) {
            this.startTime = startTime;
            setOp(DataStatus.Update);
        }
    }

    public String getSettings() {
        return settings;
    }
    public void setSettings(String settings) {
        if (settings == null){
            return;
        }
        if (this.settings == null || !this.settings.equals(settings)) {
            this.settings = settings;
            setOp(DataStatus.Update);
        }
    }

    public long getLastReqTime() {
        return lastReqTime;
    }
    public void setLastReqTime(long lastReqTime) {
        if (this.lastReqTime != lastReqTime) {
            this.lastReqTime = lastReqTime;
            setOp(DataStatus.Update);
        }
    }

    public java.util.List<java.lang.Integer> getIngotsList() {
        return ingotsList;
    }
    public void setIngotsList(java.util.List<java.lang.Integer> ingotsList) {
        if (null == ingotsList){
            return;
        }
        if (this.ingotsList == null || !this.ingotsList.equals(ingotsList)) {
            this.ingotsList = ingotsList;
            setOp(DataStatus.Update);
        }
    }

    public int getRealGetIngots() {
        return realGetIngots;
    }
    public void setRealGetIngots(int realGetIngots) {
        if (this.realGetIngots != realGetIngots) {
            this.realGetIngots = realGetIngots;
            setOp(DataStatus.Update);
        }
    }

    public boolean isGetIngots() {
        return getIngots;
    }
    public void setGetIngots(boolean getIngots) {
        if (this.getIngots != getIngots) {
            this.getIngots = getIngots;
            setOp(DataStatus.Update);
        }
    }


}
